package com.one.group.model.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 问题表实体类
 * @author kld
 */
@Data
@Table("sp_question")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Question implements Serializable {
    @Id(keyType = KeyType.Auto)
    @Column("question_id")
    private Long questionId; // 问题id
    
    @Column("questionnaire_id")
    private Long questionnaireId; // 关联问卷id
    
    private Integer type; // 问题类型：1-单选 2-填空 3-多选
    
    private String question; // 问题
    
    private Integer sort; // 题号
    
    @Column("is_required")
    private Integer isRequired; // 是否必填
    
    @Column(tenantId = true)
    private Long tenantId; // 租户ID
}